home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Info-Mac 3
/
Info_Mac_1994-01.iso
/
Development
/
General
/
SpriteWorld 1.0b3
/
Headers
/
SpriteLayer.h
< prev
next >
Wrap
Text File
|
1993-05-31
|
3KB
|
78 lines
///--------------------------------------------------------------------------------------
// SpriteLayer.h
//
// Created: Tuesday, October 27, 1992 at 10:10:06 PM
// By: Tony Myles
//
// Copyright: © 1991-93 Tony Myles, All rights reserved worldwide
//
// Description: constants, structures, and prototypes for sprite layers
///--------------------------------------------------------------------------------------
#ifndef __SPRITELAYER__
#define __SPRITELAYER__
#ifndef __SPRITE__
#include "Sprite.h"
#endif
#ifndef SW_PASCAL
#define SW_PASCAL
#endif
extern RgnHandle gSWWorkRgn;
///--------------------------------------------------------------------------------------
// sprite layer type definitions
///--------------------------------------------------------------------------------------
typedef struct SpriteLayerRec SpriteLayerRec;
typedef SpriteLayerRec *SpriteLayerPtr, **SpriteLayerHdl;
///--------------------------------------------------------------------------------------
// sprite layer data structure
///--------------------------------------------------------------------------------------
struct SpriteLayerRec
{
SpriteLayerPtr nextSpriteLayerP; // next sprite layer
SpriteLayerPtr prevSpriteLayerP; // previous sprite layer
SpritePtr headSpriteP; // head of sprite linked list
SpritePtr tailSpriteP; // tail of sprite linked list
long userData; // reserved for user
};
///--------------------------------------------------------------------------------------
// sprite layer function prototypes
///--------------------------------------------------------------------------------------
#ifdef __cplusplus
extern "C" {
#endif
SW_PASCAL OSErr SWCreateSpriteLayer(SpriteLayerPtr *spriteLayerP);
SW_PASCAL void SWDisposeSpriteLayer(SpriteLayerPtr spriteLayerP);
SW_PASCAL void SWAddSprite(SpriteLayerPtr spriteLayerP, SpritePtr newSpriteP);
SW_PASCAL void SWRemoveSprite(SpriteLayerPtr spriteLayerP, SpritePtr oldSpriteP);
SW_PASCAL void SWSwapSprite(SpriteLayerPtr spriteLayerP, SpritePtr srcSpriteP, SpritePtr dstSpriteP);
SW_PASCAL SpritePtr SWGetNextSprite(SpriteLayerPtr spriteLayerP, SpritePtr curSpriteP);
SW_PASCAL void SWLockSpriteLayer(SpriteLayerPtr spriteLayerP);
SW_PASCAL void SWUnlockSpriteLayer(SpriteLayerPtr spriteLayerP);
SW_PASCAL void SWMoveSpriteLayer(SpriteLayerPtr spriteLayerP);
SW_PASCAL void SWCollideSpriteLayer(SpriteLayerPtr srcSpriteLayerP, SpriteLayerPtr dstSpriteLayerP);
#ifdef __cplusplus
};
#endif
#endif /* __SPRITELAYER__ */